import { User } from "@/stream-user/schema.user";
import { WithAccessView } from "./schema.access";

/** 授权的作用范围 */
export type AccessScopeContext = {
  refOwnerUUid32: User["uuid32"];
  path: string;
  resource0?: string;
  resource1?: string;
};

/** 授权的具体明细（查询/创建/修改/删除/导出）*/
export type AccessDroitContext = {
  query: boolean;
  create: boolean;
  update: boolean;
  delete: boolean;
  download: boolean;
};

export type AccessAll = {
  visitorLs: WithAccessView[];
  masterLs: WithAccessView[];
  all: WithAccessView[];
};
